﻿<Window x:Class="SPM2.Framework.WPF.Windows.SettingsDialog"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:my="clr-namespace:SPM2.Framework.WPF.Components"
        xmlns:sharp="http://icsharpcode.net/sharpdevelop/treeview"
        xmlns:ViewModel="clr-namespace:SPM2.Framework.WPF.Windows.ViewModel" mc:Ignorable="d"
        Title="Settings">
    <Window.Resources>
        <ViewModel:SettingsDialogModel x:Key="Model" d:IsDataSource="True" />
    </Window.Resources>
        
    <Grid DataContext="{Binding Source={StaticResource ResourceKey=Model}}">
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="45" />
        </Grid.RowDefinitions>
        
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="100*"/>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="200*"/>
        </Grid.ColumnDefinitions>

        
        <GridSplitter HorizontalAlignment="Right" 
                    VerticalAlignment="Stretch" 
                    Grid.Column="1" ResizeBehavior="PreviousAndNext"
                    Width="5" Background="#FFBCBCBC"/>

        <sharp:SharpTreeView x:Name="TreeView" Grid.Column="0" Root="{Binding Path=Root}" />
        <!--<my:WPFTreeView x:Name="TreeView" Grid.Column="0" DataContext="{Binding Path=Root}" />-->
        <my:PropertyGridControl  x:Name="GridControl" Grid.Column="2" />

        <DockPanel Grid.Row="1" Grid.ColumnSpan="3" Height="40">
            <Button x:Name="BtnOK" Content="Ok" Width="100" Command="{Binding OKCommand}"  />
            <Button x:Name="BtnCancel" Content="Cancel" Width="100" HorizontalAlignment="Right" />
        </DockPanel>

    </Grid>
        

</Window>
